﻿#region using statements

using AeonOfStrife.Objects.Castle;

using Microsoft.Xna.Framework;

#endregion

namespace AeonOfStrife.Misc
{
	public class GameData
	{
		public GameData(Vector2 p_leftPosition, Vector2 p_rightPosition) {
			CastleLeft = new Castle(TeamType.LEFT) {
				m_position = p_leftPosition
			};

			CastleRight = new Castle(TeamType.RIGHT) {
				m_position = p_rightPosition
			};

			

			CastleToCastleDistanceSquared = (int) Vector2.DistanceSquared(CastleLeft.m_position, CastleRight.m_position);
		}

		public Castle CastleLeft { get; set; }

		public Castle CastleRight { get; set; }

		public int CastleToCastleDistanceSquared { get; private set; }

		public Castle GetCastle(TeamType p_team) {
			return p_team == TeamType.LEFT ? CastleLeft : CastleRight;
		}

		public Castle GetEnemyCastle(TeamType p_team) {
			return p_team == TeamType.RIGHT ? CastleLeft : CastleRight;
		}
	}
}